<template>
  <div class="app-container">
    <div class="eryu-list">
      <div class="Personnel">人事相关</div>
      <div class="type">
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>入职</div>
        </div>
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>转正</div>
        </div>
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>离职</div>
        </div>
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>调动</div>
        </div>
      </div>
    </div>

    <div class="eryu-list">
      <div class="Personnel">考勤假期</div>
      <div class="type">
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>外出</div>
        </div>
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>出差</div>
        </div>
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>调班</div>
        </div>
      </div>
    </div>

    <div class="eryu-list">
      <div class="Personnel">行政相关</div>
      <div class="type">
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>用章申请</div>
        </div>
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>办公用品申请</div>
        </div>
        <div class="box">
          <div class="img"><img src="" alt="" /></div>
          <div>物品采购申请</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getDoneTaskPage } from "@/api/bpm/task";
import { getDate } from "@/utils/dateUtils";

export default {
  name: "Done",
  components: {},
  data() {
    return {
      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 已办任务列表
      list: [],
      // 查询参数
      queryParams: {
        pageNo: 1,
        pageSize: 10,
        name: null,
        createTime: [],
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true;
      getDoneTaskPage(this.queryParams).then((response) => {
        this.list = response.data.list;
        this.total = response.data.total;
        this.loading = false;
      });
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNo = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    getDateStar(ms) {
      return getDate(ms);
    },
    /** 处理审批按钮 */
    // handleAudit(row) {
    //   this.$router.push({
    //     path: "/bpm/process-instance/detail",
    //     query: { id: row.processInstance.id },
    //   });
    // },
  },
};
</script>
<style lang="scss" scoped>
.app-container {
  .eryu-list {
    padding: 10px 0;
    .Personnel {
      font-weight: 700;
      font-size: 16px;
      padding: 20px;
    }
    .type {
      display: flex;
    }
    .box {
      display: flex;
      font-size: 16px;
      align-items: center;
      width: 350px;
      border: 1px solid #ccc;
      height: 80px;
      border-radius: 5px;
      margin: 0px 10px 10px 20px;
      .img {
        width: 30px;
        height: 30px;
        background-color: #ccc;
        margin-left: 20px;
        margin-right: 15px;
      }
    }
  }
}
</style>
